(function(){"use strict";BX.addCustomEvent("BX.Landing.Block:init",function(e){BX.Landing.SliderHelper.init(e,BX.Landing.SliderHelper.ACTION_INIT)});BX.addCustomEvent("BX.Landing.Block:beforeApplyContentChanges",function(e){BX.Landing.SliderHelper.destroy(e)});BX.addCustomEvent("BX.Landing.Block:Node:update",BX.debounce(function(e){BX.Landing.SliderHelper.init(e,BX.Landing.SliderHelper.ACTION_UPDATE)},300));BX.addCustomEvent("BX.Landing.Block:Card:beforeAdd",function(e){BX.Landing.SliderHelper.destroy(e)});BX.addCustomEvent("BX.Landing.Block:Card:add",function(e){BX.Landing.SliderHelper.init(e,BX.Landing.SliderHelper.ACTION_ADD)});BX.addCustomEvent("BX.Landing.Block:Cards:beforeUpdate",function(e){BX.Landing.SliderHelper.destroy(e)});BX.addCustomEvent("BX.Landing.Block:Cards:update",function(e){BX.Landing.SliderHelper.init(e,BX.Landing.SliderHelper.ACTION_UPDATE)});BX.addCustomEvent("BX.Landing.Block:Card:beforeRemove",function(e){BX.Landing.SliderHelper.destroy(e)});BX.addCustomEvent("BX.Landing.Block:updateStyle",function(e){var n=BX.Landing.SliderHelper.makeCarouselRelativeSelector(e);if($(n).slick("slickGetOption","vertical")){BX.Landing.SliderHelper.init(e,BX.Landing.SliderHelper.ACTION_UPDATE)}});BX.addCustomEvent("BX.Landing.Block:Card:remove",function(e){var n=BX.Landing.SliderHelper.makeCarouselRelativeSelector(e);if($(n).length>0){var d=e.data.selector,i=d.split("@")[0],l=parseInt(d.split("@")[1]),a=e.block.querySelectorAll(i);var t=a[l];if(!t){if(!BX.type.isNumber(l)||l===0)t=null;else t=a[l-1]}if(t){e.card=t;BX.Landing.SliderHelper.initBase(n);BX.Landing.SliderHelper.goToSlide(n,e,BX.Landing.SliderHelper.ACTION_REMOVE)}}});BX.addCustomEvent("BX.Landing.Block:remove",function(e){BX.Landing.SliderHelper.destroy(e)});BX.addCustomEvent("BX.Landing.Editor:enable",function(e){try{$(".js-carousel").slick("slickPause")}catch(e){}});BX.addCustomEvent("BX.Landing.Editor:disable",function(e){try{$(".js-carousel").slick("slickPlay")}catch(e){}})})();
//# sourceMappingURL=base_carousel_init.map.js